﻿<!DOCTYPE html>
<html lang="en">
<head>
    <title>宾果高校</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/sweetalert.min.css" />
    <script src="js/jquery-1.12.2.min.js"></script>
    <script src="js/validator.min.js"></script>
    <script src="js/sha512.js"></script>
    <script src="js/common.js"></script>
    <script src="js/login.js"></script>
    <script src="js/sweetalert.min.js"></script>
    <script>

        var param = common.getUrlArgStr();
        //param.id = 20000001;
        if (param.id == undefined || param.code == undefined) {
            //id=13928685702&code=6345
            window.location = "toreset.html";
        }
        else {
            
            common.commonAjax({ type: 'Get', url: 'api/login/get?id=' + param.id + "&validType=ChangePassword&code=" + param.code, sMethod: AfteAjax });
        }

        function AfteAjax(ctx) {
            
            if (ctx == "" || ctx == null) {
                window.location = "toreset.html";
                return;
            }
        }

        function AfteAjax1(ctx) {
            
            if (ctx == "" || ctx == null) {
                $('#divReminder').html("").append("操作失败，请重试！");
                return;
            }

            window.location = "enterprise/index.html";
        }

        $(document).ready(function () {

            $("#btnSubmit").click(function () {

                if (!common.validateForm())
                    return;

                var values = common.GetCtrlValues({
                    ContentID: "formValidate"
                })

                common.commonAjax({ type: 'Put', url: 'api/login/put/' + param.id, data: values, sMethod: AfteAjax1 });
            })
        });
    </script>
    <style>
        body {
            padding-top: 280px;
        }

        ul > li {
            float: left;
        }
    </style>
</head>
<body>
    <div class="orange">
        <div class="logo-auditid"><img src="images/logo-white.png" alt=""></div>
    </div>
    <div class="main">
        <div class="wrap">
            <div class="reset-box">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="auditid-wrap">
                            <div class="auditid-step">
                                <ul class="clearfix">
                                    <li style="margin-left: 16px;">
                                        <h2 class="text-center">01</h2>
                                        <div>验证手机号</div>
                                    </li>
                                    <div class="step-line"></div>
                                    <li style="margin-left: 10px;">
                                        <h2 style="color: #FF4500;" class="text-center">02</h2>
                                        <div>重置密码</div>
                                    </li>
                                </ul>
                            </div>
                            <form id="formValidate" action="" class="form-horizontal">
                                <div class="form-group">
                                    <input type="Password" placeholder="请输入新密码" data-error="请输入密码" required autofocus="autofocus" class="form-control">
                                    <div class="help-block with-errors"></div>
                                </div>
                                <div class="form-group">
                                    <input type="Password" placeholder="请再次输入新密码" id="Password" data-error="请输入密码" required class="form-control">
                                    <div class="help-block with-errors"></div>
                                </div>
                                <div class="form-group">
                                    <button type="button" id="btnSubmit" class="btn btn-default btn-block">确定</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer">
        <div class="auditid-slogan text-center">
            <p>— 宾果高校为赞助而生 —</p>
        </div>
    </div>
</body>
</html>